package cn.ecut.servlet;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;

/**
 * @author lujiapeng
 * @className FirstServlet
 * @description 第一个Servlet
 * @date 2020/9/10 15:19
 **/
public class FirstServlet implements javax.servlet.Servlet{
    @Override
    public void init(ServletConfig config) throws ServletException {
        System.out.println("FirstServlet#init方法执行了");
    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        System.out.println("FirstServlet#service方法");
    }

    @Override
    public String getServletInfo() {
        return "我的第一个Servlet";
    }

    @Override
    public void destroy() {
        System.out.println("被销毁了");
    }
}
